<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="form" uri="/form"%>
<html>
    <head>
        <title>Title</title>
    </head>
    <body>
        <%@ include file="/emp/navigation.jsp"%>

        <h1>修改员工</h1>
        <hr/>

        <form action="${pageContext.request.contextPath}/modify.emp" method="post">
            <input type="hidden" name="id" value="${emp.id}"/>
            姓名：<input type="text" name="name" value="${emp.name}"/><br/>
            工资：<input type="password" name="salary" value="${emp.salary}"/><br/>
            性别：<input type="radio" name="sex" value="1" ${"1" eq emp.sex?"checked='checked'":""}/>男
                 <input type="radio" name="sex" value="0" ${"0" eq emp.sex?"checked='checked'":""}/>女<br/>
            学历：<select name="edu">
                    <option value="0">---请选择---</option>
                    <option value="1" ${"1" eq emp.edu?"selected='selected'":""}>高中</option>
                    <option value="2" ${"2" eq emp.edu?"selected='selected'":""}>专科</option>
                    <option value="3" ${"3" eq emp.edu?"selected='selected'":""}>本科</option>
                 </select><br/>
            爱好：<input type="checkbox" name="hobbies" value="1" ${form:getChecked("1",emp.hobbies)}/>吃
                 <input type="checkbox" name="hobbies" value="2" ${form:getChecked("2",emp.hobbies)}/>玩
                 <input type="checkbox" name="hobbies" value="3" ${form:getChecked("3+",emp.hobbies)}/>睡<br/>
            简介：<textarea rows="5" cols="20" name="description">${emp.description}</textarea><br/>
            <input type="submit" value="修改"/>
        </form>
    </body>
</html>
